library(stringr)
ans <- readLines('clipboard')
ans <- str_replace(ans,'### ','</br>**')
ans[str_which(ans, '\\d+月')] <- paste(ans[str_which(ans, '\\d+月')],'**</br>',sep='')

# ans[str_which(ans, '\\d+月')] <- paste('**</br>',ans[str_which(ans, '\\d+月')],sep='')

write.table(ans, file = 'ans.txt',quote = FALSE,row.names = FALSE)

